﻿#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H

#include "qlineedit.h"
#include <QCefView.h>
#include <QSpinBox>
#include <QWidget>


class SettingsDialog:public QFrame
{
    Q_OBJECT
public:
    SettingsDialog(QWidget* parent = nullptr);
    void showPopup(QPoint pos);
    // void hideEvent(QHideEvent *event) override;
    // void showEvent(QShowEvent *event) override;
public slots:
    void submit();
signals:
    void serverChanged(QString url);
    void audioAddrChanged();
private:
    QWidget *_parent;
    QLineEdit *_serverAddrEdit;
    QLineEdit *_audioAddrEdit;
    QLineEdit *_audioPortEdit;
    QString _serverAddr;
    QString _audioAddr;
    int _audioPort;
    QCefView *_settingsWidget;
};

#endif // SETTINGSDIALOG_H
